package com.qijian.maindata.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qijian.maindata.domain.ProcessPerformanceFlow;
import com.qijian.maindata.domain.query.ProcessPerformanceFlowQuery;
import com.qijian.maindata.domain.vo.ProcessPerformanceFlowVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 工艺派工-流程主Mapper接口
 *
 * @author qijian
 * @date 2024-05-24
 */
public interface ProcessPerformanceFlowMapper extends BaseMapper<ProcessPerformanceFlow> {

    @Select("select count(0) from main_process_performance_flow WHERE create_time >= CURRENT_DATE ")
    int countCurrentDateWithDel();

    ProcessPerformanceFlowVo getVo(@Param("id") Long id);
    List<ProcessPerformanceFlowVo> listVo(@Param(Constants.WRAPPER) QueryWrapper<ProcessPerformanceFlowQuery> queryWrapper);

    Page<ProcessPerformanceFlowVo> selectPageVo(Page<ProcessPerformanceFlowVo> page, @Param(Constants.WRAPPER) QueryWrapper<ProcessPerformanceFlowQuery> queryWrapper);

    ProcessPerformanceFlowVo getFlowVo(@Param("id") Long flowId);
}
